package com.example.practical_training_projects.mapper;

import com.example.practical_training_projects.entity.articles_class;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface articles_classMapper {
    @Select("SELECT *FROM articles_class order by create_time desc")
    List<articles_class> getAllclass();


    /**
     *
      * @param
     * @return

    @Delete("DELETE FROM articles_class where as_uid = #{as_uid}")
    Integer deleteclassbyid(Integer as_uid);  */

    @Insert("INSERT INTO articles_class (as_class,create_time,update_time) VALUES(#{as_class},sysdate(),sysdate())")
    Integer insertclass(articles_class a_cls);
    @Update("UPDATE articles_class set as_class=#{as_class},create_time=now(),update_time=now() where as_uid=#{as_uid}")
    Integer updateclass(articles_class a_cls);
}
